package dk.lector.service;

import android.app.IntentService;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Environment;
import android.os.SystemClock;
import android.util.Log;
import android.widget.RemoteViews;
import dk.lector.DashBoardActivity;
import dk.lector.R;
import dk.lector.datasource.DocDBRepository;
import dk.lector.providers.CACHEDDOC_VIEWContentProvider;
import dk.lector.providers.DOC_METADATAContentProvider;
import dk.lector.providers.DOC_STOREDContentProvider;
import dk.lector.remote.TSMobileService;
import dk.lector.utils.IconLoader;
import dk.lector.utils.NotificationRunnable;

public class DocumentService extends IntentService {
	private String TAG = this.getClass().getSimpleName();

	public DocumentService() {
		super("DocumentService");
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void onHandleIntent(Intent intent) {
		final int documentID = intent.getIntExtra(
				DOC_METADATAContentProvider._ID, 0);
		final String username = intent.getStringExtra("username");
		final String password = intent.getStringExtra("password");
	
		
		new Thread(new Runnable() {

			public void run() {

				// TODO Auto-generated method stub
				TSMobileService.getDocumentByID(getBaseContext(), documentID,
						username, password);

			}
		}).start();
		


	}


}
